<?php /* Smarty version Smarty-3.0.8, created on 2014-11-03 19:12:44
         compiled from "tpl/js/controller/setting-my-password.js" */ ?>
<?php /*%%SmartyHeaderCode:80525457632c548ce9-06872693%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '24e9967591bd238f7fa2738b1f0a603fd604171b' => 
    array (
      0 => 'tpl/js/controller/setting-my-password.js',
      1 => 1410831873,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '80525457632c548ce9-06872693',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
      //修改密码
      App.controller('setting-my-password', function (page) {

        $(page).on("appReady",function(){
            $("#username").text(kget("username"));
            $("#studentid").text(kget("studentid"));
        });
        $(page).find("#ptime-login-button").on("tap",function(){
          $(this).text("修改中……");
          var v_this = $(this);
          var stuid=$("#studentid").text();
          var oldPw=$("#oldPw").val();
          var newPw=$("#newPw").val();
          var repeatPw=$("#repeatPw").val();
      
          $.post(url("user","modify_pw"),{stuid:stuid,oldPw:oldPw,newPw:newPw,repeatPw:repeatPw},function(data){

            if(typeof(data.id) != "undefined"){
              App.load("setting-nav");
            }else{
              v_this.text("确定");
              alert(data.errmsg);
            }
          },"json");
        });
      });